package com.yifeng.repo.base.api;

import java.util.List;

/**
 * Created by daibing on 2022/7/29.
 */
public class PageResult<E> {
    private int pageNo;
    private int pageSize;
    private int totalPage;
    private long totalSize;
    private List<E> result;

    public PageResult() {
        this(1, 10);
    }

    public PageResult(int pageNo, int pageSize) {
        this.pageNo = pageNo;
        this.pageSize = pageSize;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public long getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(long totalSize) {
        this.totalSize = totalSize;
    }

    public List<E> getResult() {
        return result;
    }

    public void setResult(List<E> result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "Page {" +
                "pageNo:" + pageNo +
                ", pageSize:" + pageSize +
                ", totalPage:" + totalPage +
                ", totalSize:" + totalSize +
                '}';
    }
}
